Graph reduction machine